message(STATUS "OB_BUILD_LIBOBLOG ${OB_BUILD_LIBOBLOG}")
if (OB_BUILD_LIBOBLOG)
  find_package(Git QUIET)
  if (GIT_FOUND)
    execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --remote
      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
      RESULT_VARIABLE GIT_SUBMOD_RESULT)
    if (NOT GIT_SUBMOD_RESULT EQUAL "0")
      message(FATAL_ERROR "git submodule update --init --remote failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
    endif()
    add_subdirectory(${PROJECT_SOURCE_DIR}/deps/logmessage ${PROJECT_BINARY_DIR}/deps/logmessage EXCLUDE_FROM_ALL)
    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
    add_subdirectory(src)
    add_subdirectory(tests)
  else()
    message("cannot find executable git")
  endif()
endif()
